package com.thoughtworks.studio.tools.cardkit.launcher;

import java.io.IOException;

import com.thoughtworks.studio.tools.cardkit.BeanFactory;
import com.thoughtworks.studio.tools.cardkit.CardManager;

public class Launcher {

	/**
	 * Entry point for starting from the command line
	 * 
	 */
	public static void main(String[] args) {
		try {
			Launcher launcher = new Launcher();
			launcher.run(args);
		} catch (LaunchException e) {
			System.err.println(e.getMessage());
		} catch (Throwable t) {
			t.printStackTrace();
		}
	}

	void run(String[] args) throws LaunchException, IOException {
		CardManager manager=(CardManager)BeanFactory.getBean("cardManager");
		manager.run(args);
	}

}
